package io.renren.modules.echarts.controler;

import io.renren.modules.echarts.ResVo.ScatterVo;
import io.renren.modules.echarts.ResVo.StripVo;
import io.renren.modules.echarts.service.RightService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/api")
public class RightControler {
    @Autowired
    private RightService rightService;

    @GetMapping("/strip")
    public List<StripVo> getStripAllData(){
        return rightService.getStripAllData();
    }

    @GetMapping("/scatter")
    public List<ScatterVo> getScatterAllData(){
        return rightService.getScatterAllData();
    }
}
